﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mogre;

namespace WastedMechanics
{
    public static class MainScript
    {
        public static int RaidersCount = 0;

        public static void GiveColt()
        {
            Engine.HUDController.PostScreenMessage("Otrzymano rewolwer colt");
            ItemPistol colt = Engine.ItemTemplates["Colt"].Clone() as ItemPistol;
            Engine.ObjectManager.GetCharacter("Nolty").Equipment.AddItem(colt);
            if (Engine.ObjectManager.GetCharacter("Nolty").Pistol == null)
                Engine.ObjectManager.GetCharacter("Nolty").Pistol = colt;
        }

        public static void SheriffGoKitchen()
        {
            //Engine.ObjectManager.GetCharacter("Sheriff").PopOutTask();
            Engine.ObjectManager.GetCharacter("Sheriff").PushTask(new CharTaskIdle(Engine.ObjectManager.GetCharacter("Sheriff"),
                new Vector3(3.7f, 0, -7), new Vector3(3.709223f, 1.646649f, -8.592129f)));
            Engine.ObjectManager.GetCharacter("Sheriff").PushTask(new CharTaskMoveTo(Engine.ObjectManager.GetCharacter("Sheriff"),
            new Vector3(3.709223f, 1.646649f, -8.592129f), false));
        }

        public static void SheriffGoBack()
        {
            //Engine.ObjectManager.GetCharacter("Sheriff").PopOutTask();
            Engine.ObjectManager.GetCharacter("Sheriff").PushTask(new CharTaskIdle(Engine.ObjectManager.GetCharacter("Sheriff"),
                new Vector3(0, 0, -2), new Vector3(0, 1, -5.5f)));
            Engine.ObjectManager.GetCharacter("Sheriff").PushTask(new CharTaskMoveTo(Engine.ObjectManager.GetCharacter("Sheriff"),
                new Vector3(0, 1, -5.5f), true));
        }

        public static void QueueEnemy(Character ch, Character enemy)
        {
            if (ch.CurrentTask == null || !(ch.CurrentTask is CharTaskAttack))
            {
                ch.PushTask(new CharTaskAttack(ch, enemy));
            }
            else
            {
                if (!(ch.CurrentTask as CharTaskAttack).Targets.Contains(enemy))
                    (ch.CurrentTask as CharTaskAttack).Targets.Add(enemy);
            }

        }


        public static void Ambush()
        {
            SheriffGoBack();
            List<Vector3> positions = new List<Vector3>();
            Engine.FlagOff("Quest/FindTheBomb");
            //positions.Add(new Vector3(9.824723f, 0.9510989f, -6.693202f));
            positions.Add(new Vector3(9.011025f, 0.9257792f, -12.05899f));
            //positions.Add(new Vector3(2.097569f, 0.9256568f, -12.12803f));
            positions.Add(new Vector3(-9.531222f, 0.9249406f, -12.00284f));
            positions.Add(new Vector3(-10.55636f, 0.92408f, -7.652542f));
            positions.Add(new Vector3(2.245025f, 0.9201373f, 43.43588f));
            positions.Add(new Vector3(3.953792f, 0.9188309f, 44.39783f));
            positions.Add(new Vector3(2.701746f, 0.9083514f, 47.81139f));
            positions.Add(new Vector3(-1.56617f, 0.7764335f, 46.84032f));
            positions.Add(new Vector3(-3.287277f, 0.7301673f, 43.94728f));
            positions.Add(new Vector3(-6.858055f, 0.4201801f, 44.51616f));
            positions.Add(new Vector3(-6.315906f, 0.9021164f, -17.88558f));
            positions.Add(new Vector3(2.271747f, 0.6591119f, -21.18697f));
            positions.Add(new Vector3(11.49113f, 0.8828035f, -18.40032f));
            positions.Add(new Vector3(17.7329f, 1.031191f, -9.194765f));
            //positions.Add(new Vector3(5.505785f, 4.466722f, -5.120396f));

            Engine.SoundManager.Musics["nofight.ogg"].Pause();
            Engine.SoundManager.Musics["fight.ogg"].Play();
            Engine.SoundManager.Musics["fight.ogg"].FmodChannel.setVolume(0.3f);

            positions.ForEach(pos =>
                {
                    SpawnRaider(pos, "Raider");
                });
        }

        public static void SpawnRaider(Vector3 pos, string camp, bool updateCounter=true)
        {
            if (updateCounter)
                RaidersCount++;

            Character raider = Engine.ObjectManager.NewCharacter(Engine.CharacterProfiles["Raider1"], camp);
            raider.Position = pos;
            raider.TurnTo(new Vector3(0, 0, -2));
            raider.Equipment.Capacity = 200.0f;
            raider.OnSeeCharacter += ((me, seen) =>
               {
                   if (seen.Label != camp)
                       QueueEnemy(me, seen);
               });
            raider.OnAttacked += ((me, who) =>
            {
                QueueEnemy(me, who);
            });
            raider.OnDied += (me =>
                {
                    if (updateCounter)
                    {
                        RaidersCount--;
                        if (RaidersCount == 0)
                        {
                            Engine.SoundManager.Musics["fight.ogg"].Pause();
                            Engine.SoundManager.Musics["nofight.ogg"].Play();
                            Engine.SoundManager.Musics["nofight.ogg"].FmodChannel.setVolume(0.2f);
                            Engine.FlagOn("AllRaidersDead");
                        }
                    }
                }
            );
            ItemM1H banditWpn = Engine.ItemTemplates["Axe"].Clone() as ItemM1H;
            raider.Equipment.AddItem(banditWpn);
            raider.M1HWeapon = banditWpn;

            int random = Helper.RandomInt(3);
            if (random == 1)
                raider.Armour = Engine.ItemTemplates["ArmourCloth2"].Clone() as ItemArmour;
            else if (random == 2)
                raider.Armour = Engine.ItemTemplates["ArmourRaider"].Clone() as ItemArmour;

            raider.TakeM1H();
            raider.PushTask(new CharTaskMoveTo(raider, new Vector3(Mogre.Math.RangeRandom(-3, 3), 2, 0), true));
        }


        public static void CreateSheriff()
        {
            Character sheriff = Engine.ObjectManager.NewCharacter(Engine.CharacterProfiles["Sheriff"], "Sheriff");
            sheriff.Position = new Vector3(0, 1.6f, -5.5f);
            sheriff.TurnTo(new Vector3(0, 0, -2));
            sheriff.Equipment.Capacity = 200.0f;
            sheriff.TalkResponse = Dialogues.Sherif;
            ItemPistol guardsColt = Engine.ItemTemplates["Colt"].Clone() as ItemPistol;
            sheriff.Equipment.AddItem(guardsColt);
            sheriff.Pistol = guardsColt;
            sheriff.PushTask(new CharTaskIdle(sheriff, new Vector3(0,0,1)));
            sheriff.OnSeeCharacter += ((me, seen) =>
            {
                if (seen.Label == "Raider")
                    QueueEnemy(me, seen);
 
            });
            sheriff.OnAttacked += ((me, who) =>
            {
                QueueEnemy(me, who);
                QueueEnemy(Engine.ObjectManager.GetCharacter("Kyle"), who);
                QueueEnemy(Engine.ObjectManager.GetCharacter("Bob"), who);                
            });           
        }


        public static void CreateGuards()
        {  

            Character guard2 = null;
            Character guard1 = Engine.ObjectManager.NewCharacter(Engine.CharacterProfiles["Guard"], "Kyle");
            guard1.Position = new Vector3(1.5f, 1.6f, -3);
            guard1.TurnTo(new Vector3(0, 0, -2));
            guard1.TalkResponse = Dialogues.Kyle;
            guard1.Equipment.Capacity = 200.0f;
            guard1.DisplayName = "Kyle";
            guard1.OnSeeCharacter += ((me, seen) =>
            {
                if (seen.Label == "Raider")
                    QueueEnemy(me, seen);
            });
            guard1.OnAttacked += ((me, who) =>
            {
                QueueEnemy(me, who);
                if (Engine.ObjectManager.GetCharacter("Sheriff").CurrentTask == null || !(Engine.ObjectManager.GetCharacter("Sheriff").CurrentTask is CharTaskAttack))
                    Engine.ObjectManager.GetCharacter("Sheriff").PushTask(new CharTaskAttack(Engine.ObjectManager.GetCharacter("Sheriff"), who));
                if (Engine.ObjectManager.GetCharacter("Bob").CurrentTask == null || !(Engine.ObjectManager.GetCharacter("Bob").CurrentTask is CharTaskAttack))
                    Engine.ObjectManager.GetCharacter("Bob").PushTask(new CharTaskAttack(Engine.ObjectManager.GetCharacter("Bob"), who));
            });
            ItemPistol guardsColt = Engine.ItemTemplates["Colt"].Clone() as ItemPistol;
            guard1.Equipment.AddItem(guardsColt);
            guard1.Pistol = guardsColt;
            guard1.PushTask(new CharTaskIdle(guard1, new Vector3(0.5f, 0, -2)));
            guard1.Equipment.AddItem(Engine.ItemTemplates["Laser"].Clone());
            guard1.Equipment.AddItem(Engine.ItemTemplates["ArmourBio"].Clone());
            guard1.Armour = Engine.ItemTemplates["ArmourBio"].Clone() as ItemArmour;

            guard2 = Engine.ObjectManager.NewCharacter(Engine.CharacterProfiles["Guard"], "Bob");
            guard2.Position = new Vector3(-1.5f, 1.6f, -3);
            guard2.TurnTo(new Vector3(0, 0, -2));
            guard2.Equipment.Capacity = 200.0f;
            guard2.DisplayName = "Bob";
            guard2.TalkResponse = Dialogues.Bob;
            guard2.OnSeeCharacter += ((me, seen) =>
            {
                if (seen.Label == "Raider")
                    QueueEnemy(me, seen);
            });
            guard2.OnAttacked += ((me, who) =>
                {
                    QueueEnemy(me, who);
                    if (Engine.ObjectManager.GetCharacter("Kyle").CurrentTask == null || !(Engine.ObjectManager.GetCharacter("Kyle").CurrentTask is CharTaskAttack))
                        Engine.ObjectManager.GetCharacter("Kyle").PushTask(new CharTaskAttack(Engine.ObjectManager.GetCharacter("Kyle"), who));
                    if (Engine.ObjectManager.GetCharacter("Bob").CurrentTask == null || !(Engine.ObjectManager.GetCharacter("Bob").CurrentTask is CharTaskAttack))
                        Engine.ObjectManager.GetCharacter("Bob").PushTask(new CharTaskAttack(Engine.ObjectManager.GetCharacter("Bob"), who));
                });
            guardsColt = Engine.ItemTemplates["Colt"].Clone() as ItemPistol;
            guard2.Equipment.AddItem(guardsColt);
            guard2.Pistol = guardsColt;
            guard2.PushTask(new CharTaskIdle(guard2, new Vector3(-0.5f, 0, -2)));
            guard2.Armour = Engine.ItemTemplates["ArmourBio"].Clone() as ItemArmour;
        }

        public static void CreateBobArea()
        {
            TriggerVolume bobtv = new TriggerVolume();
            bobtv.BeginShapeBuild();
            bobtv.AddBoxPart(new Vector3(0, 2, -3), Quaternion.IDENTITY, new Vector3(3, 3, 3));
            bobtv.EndShapeBuild();
            bobtv.OnCharacterEntered += ((tv, ch) =>
                {
                    if (ch == Engine.ObjectManager.GetCharacter("Nolty") && Engine.GetFlag("Bob/Zaczepka"))
                    {
                        ch.BeginConversation(Engine.ObjectManager.GetCharacter("Bob"));
                        Engine.ObjectManager.GetCharacter("Bob").BeginConversation(ch);
                    }
                });
            Engine.ObjectManager.Add(bobtv);
        }

        public static void CreateScenery()
        {
            Container desk = new Container(Engine.ContainerProfiles["Desk"]);
            desk.Position = new Vector3(7.35f, 3.93f, -8.19f);
            desk.Orientation = Helper.QuaternionFromAngle(-90, Vector3.UNIT_Y);
            desk.Equipment.AddItem(Engine.ItemTemplates["Axe"].Clone());
            Engine.ObjectManager.Add(desk);

            Container bookcase = new Container(Engine.ContainerProfiles["Bookcase"]);
            bookcase.Position = new Vector3(-7.3f, 4.44f, -4.4f);
            bookcase.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(bookcase);

            bookcase = new Container(Engine.ContainerProfiles["Bookcase"]);
            bookcase.Position = new Vector3(-2.56f, 4.44f, -4.4f);
            bookcase.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(bookcase);

            bookcase = new Container(Engine.ContainerProfiles["Bookcase"]);
            bookcase.Position = new Vector3(0.68f, 4.44f, -4.4f);
            bookcase.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(bookcase);

            bookcase = new Container(Engine.ContainerProfiles["Bookcase"]);
            bookcase.Position = new Vector3(1.55f, 4.44f, -4.4f);
            bookcase.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(bookcase);

            bookcase = new Container(Engine.ContainerProfiles["Bookcase"]);
            bookcase.Position = new Vector3(6.36f, 4.44f, -6.81f);
            bookcase.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(bookcase);

            bookcase = new Container(Engine.ContainerProfiles["Bookcase"]);
            bookcase.Position = new Vector3(-7.35f, 1.6f, -4.4f);
            bookcase.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(bookcase);

            Container drawers = new Container(Engine.ContainerProfiles["Drawers"]);
            drawers.Position = new Vector3(-1.58f, 3.96f, -4.55f);
            drawers.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(drawers);

            drawers = new Container(Engine.ContainerProfiles["Drawers"]);
            drawers.Position = new Vector3(-0.25f, 3.96f, -4.55f);
            drawers.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            drawers.Equipment.AddItem(Engine.ItemTemplates["Tool"].Clone());            
            Engine.ObjectManager.Add(drawers);

            drawers = new Container(Engine.ContainerProfiles["Drawers"]);
            drawers.Position = new Vector3(-6.37f, 3.96f, -4.55f);
            drawers.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            drawers.Equipment.AddItem(Engine.ItemTemplates["ArmourBio"].Clone());
            Engine.ObjectManager.Add(drawers);

            drawers = new Container(Engine.ContainerProfiles["Drawers"]);
            drawers.Position = new Vector3(-2.73f, 1.14f, -4.55f);
            drawers.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(drawers);

            drawers = new Container(Engine.ContainerProfiles["Drawers"]);
            drawers.Position = new Vector3(-7.5f, 1.14f, -9.2f);
            drawers.Orientation = Helper.QuaternionFromAngle(90, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(drawers);

            drawers = new Container(Engine.ContainerProfiles["Drawers"]);
            drawers.Position = new Vector3(7.5f, 1.14f, -4.73f);
            drawers.Orientation = Helper.QuaternionFromAngle(-90, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(drawers);

            Container vase = new Container(Engine.ContainerProfiles["Vase"]);
            vase.Position = new Vector3(7.24f, 4.1f, -9.35f);
            vase.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(vase);

            vase = new Container(Engine.ContainerProfiles["Vase"]);
            vase.Position = new Vector3(1.56f, 4.1f, -9.35f);
            vase.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(vase);

            vase = new Container(Engine.ContainerProfiles["Vase"]);
            vase.Position = new Vector3(-3.47f, 4.1f, -4.47f);
            vase.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(vase);

            vase = new Container(Engine.ContainerProfiles["Vase"]);
            vase.Position = new Vector3(-2.52f, 1.27f, -9.44f);
            vase.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(vase);

            Container fridge = new Container(Engine.ContainerProfiles["Fridge"]);
            fridge.Position = new Vector3(2.57f, 1.48f, -7.97f);
            fridge.Orientation = Helper.QuaternionFromAngle(90, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(fridge);
            Item menorah = Engine.ItemTemplates["Menorah"].Clone() as Item;
            fridge.Equipment.AddItem(menorah);

            Described bed = new Described(Engine.DescribedProfiles["Bed"]);
            bed.Position = new Vector3(-7.0f, 4.0f, -8.6f);
            bed.Orientation = Helper.QuaternionFromAngle(0, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(bed);

            Described painting = new Described(Engine.DescribedProfiles["Painting2"]);
            painting.Position = new Vector3(5.96f, 5.15f, -9.77f);
            painting.Orientation = Helper.QuaternionFromAngle(0, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(bed);

            painting = new Described(Engine.DescribedProfiles["Painting1"]);
            painting.Position = new Vector3(-5.67f, 5.29f, -9.76f);
            painting.Orientation = Helper.QuaternionFromAngle(0, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(bed);

            painting = new Described(Engine.DescribedProfiles["Painting1"]);
            painting.Position = new Vector3(-5.67f, 2.2f, -9.76f);
            painting.Orientation = Helper.QuaternionFromAngle(0, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(bed);


            Described toilet = new Described(Engine.DescribedProfiles["Toilet"]);
            toilet.Position = new Vector3(2.66f, 4.19f, -5.9f);
            toilet.Orientation = Helper.QuaternionFromAngle(0, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(toilet);

            Described bath = new Described(Engine.DescribedProfiles["Bath"]);
            bath.Position = new Vector3(7.25f, 3.9f, -5.28f);
            bath.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(bath);

            Described sink = new Described(Engine.DescribedProfiles["Sink"]);
            sink.Position = new Vector3(5.38f, 4.48f, -6.13f);
            sink.Orientation = Helper.QuaternionFromAngle(0, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(sink);

            Described tap = new Described(Engine.DescribedProfiles["Tap"]);
            tap.Position = new Vector3(5.38f, 4.76f, -6.28f);
            tap.Orientation = Helper.QuaternionFromAngle(0, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(tap);

            tap = new Described(Engine.DescribedProfiles["Tap"]);
            tap.Position = new Vector3(7.3f, 4.42f, -6.28f);
            tap.Orientation = Helper.QuaternionFromAngle(0, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(tap);

            Described roundTable = new Described(Engine.DescribedProfiles["RoundTable"]);
            roundTable.Position = new Vector3(-4.8f, 3.936f, -9.28f);
            roundTable.Orientation = Helper.QuaternionFromAngle(180, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(roundTable);

            Described table = new Described(Engine.DescribedProfiles["Table"]);
            table.Position = new Vector3(2.97f, 3.94f, -9.27f);
            table.Orientation = Helper.QuaternionFromAngle(0, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(table);

            table = new Described(Engine.DescribedProfiles["Table"]);
            table.Position = new Vector3(-4.88f, 1.11f, -5.9f);
            table.Orientation = Helper.QuaternionFromAngle(0, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(table);

            table = new Described(Engine.DescribedProfiles["Table"]);
            table.Position = new Vector3(-4.88f, 1.11f, -6.98f);
            table.Orientation = Helper.QuaternionFromAngle(0, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(table);

            table = new Described(Engine.DescribedProfiles["Table"]);
            table.Position = new Vector3(4.9f, 1.11f, -9.02f);
            table.Orientation = Helper.QuaternionFromAngle(90, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(table);

            Described richChair = new Described(Engine.DescribedProfiles["RichChair"]);
            richChair.Position = new Vector3(-3.926f, 4.173f, -9.41f);
            richChair.Orientation = Helper.QuaternionFromAngle(-60, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(richChair);

            richChair = new Described(Engine.DescribedProfiles["RichChair"]);
            richChair.Position = new Vector3(6.91f, 4.173f, -8.37f);
            richChair.Orientation = Helper.QuaternionFromAngle(90, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(richChair);

            richChair = new Described(Engine.DescribedProfiles["RichChair"]);
            richChair.Position = new Vector3(-3.88f, 1.34f, -5.89f);
            richChair.Orientation = Helper.QuaternionFromAngle(-83, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(richChair);

            richChair = new Described(Engine.DescribedProfiles["RichChair"]);
            richChair.Position = new Vector3(-3.88f, 1.34f, -6.89f);
            richChair.Orientation = Helper.QuaternionFromAngle(-97, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(richChair);

            richChair = new Described(Engine.DescribedProfiles["RichChair"]);
            richChair.Position = new Vector3(-5.88f, 1.34f, -5.89f);
            richChair.Orientation = Helper.QuaternionFromAngle(80, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(richChair);

            richChair = new Described(Engine.DescribedProfiles["RichChair"]);
            richChair.Position = new Vector3(-5.88f, 1.34f, -6.89f);
            richChair.Orientation = Helper.QuaternionFromAngle(95, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(richChair);

            Described chair = new Described(Engine.DescribedProfiles["Chair"]);
            chair.Position = new Vector3(5.42f, 1.35f, -8.93f);
            chair.Orientation = Helper.QuaternionFromAngle(-83, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(chair);

            chair = new Described(Engine.DescribedProfiles["Chair"]);
            chair.Position = new Vector3(3.81f, 1.35f, -9.25f);
            chair.Orientation = Helper.QuaternionFromAngle(13, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(chair);


            Described cupboard = new Described(Engine.DescribedProfiles["Cupboard"]);
            cupboard.Position = new Vector3(-3.55f, 4.05f, -7.21f);
            cupboard.Orientation = Helper.QuaternionFromAngle(270, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(cupboard);

            cupboard = new Described(Engine.DescribedProfiles["Cupboard"]);
            cupboard.Position = new Vector3(7.45f, 1.23f, -9.13f);
            cupboard.Orientation = Helper.QuaternionFromAngle(270, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(cupboard);

            cupboard = new Described(Engine.DescribedProfiles["Cupboard"]);
            cupboard.Position = new Vector3(7.45f, 1.23f, -7.8f);
            cupboard.Orientation = Helper.QuaternionFromAngle(270, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(cupboard);

            cupboard = new Described(Engine.DescribedProfiles["Cupboard"]);
            cupboard.Position = new Vector3(2.54f, 1.23f, -9.13f);
            cupboard.Orientation = Helper.QuaternionFromAngle(90, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(cupboard);

            Described smallerCupboard = new Described(Engine.DescribedProfiles["SmallerCupboard"]);
            smallerCupboard.Position = new Vector3(7.5f, 2.77f, -9.26f);
            smallerCupboard.Orientation = Helper.QuaternionFromAngle(270, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(smallerCupboard);

            smallerCupboard = new Described(Engine.DescribedProfiles["SmallerCupboard"]);
            smallerCupboard.Position = new Vector3(7.5f, 2.77f, -8.18f);
            smallerCupboard.Orientation = Helper.QuaternionFromAngle(270, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(smallerCupboard);

            smallerCupboard = new Described(Engine.DescribedProfiles["SmallerCupboard"]);
            smallerCupboard.Position = new Vector3(7.5f, 2.77f, -4.73f);
            smallerCupboard.Orientation = Helper.QuaternionFromAngle(270, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(smallerCupboard);

            Described stove = new Described(Engine.DescribedProfiles["Stove"]);
            stove.Position = new Vector3(7.3f, 1.2f, -6.2f);
            stove.Orientation = Helper.QuaternionFromAngle(-90, Vector3.UNIT_Y);
            Engine.ObjectManager.Add(stove);
        }
    }
}
